package br.com.werp.suporte.Hardware;
import java.util.*;
import org.apache.struts.action.*;
import javax.servlet.http.*;

/**
 * Creation Date 03/09/2004 10:26:08
 * Last Modify Date 17/10/2006 14:49:45
 */

public class RedeDetalheActionForm extends org.apache.struts.action.ActionForm {
  public String rede_id;
  public String rede_marca;
  public String rede_modelo;
  public String rede_txtransferencia;
  public String rede_slot;
  private boolean valida = false;
  public RedeDetalheActionForm() {
  }
  /**
    * REDE_ID: Gets the value of this field.
    */
  public String getRede_id() {
    return rede_id;
  }
  /**
     * REDE_ID: Sets thhe value for this field.
     */
  public void setRede_id(String REDE_ID) {
    rede_id = REDE_ID;
  }
  /**
    * REDE_MARCA: Gets the value of this field.
    */
  public String getRede_marca() {
    return rede_marca;
  }
  /**
     * REDE_MARCA: Sets thhe value for this field.
     */
  public void setRede_marca(String REDE_MARCA) {
    rede_marca = REDE_MARCA;
  }
  /**
    * REDE_MODELO: Gets the value of this field.
    */
  public String getRede_modelo() {
    return rede_modelo;
  }
  /**
     * REDE_MODELO: Sets thhe value for this field.
     */
  public void setRede_modelo(String REDE_MODELO) {
    rede_modelo = REDE_MODELO;
  }
  /**
    * REDE_TXTRANSFERENCIA: Gets the value of this field.
    */
  public String getRede_txtransferencia() {
    return rede_txtransferencia;
  }
  /**
     * REDE_TXTRANSFERENCIA: Sets thhe value for this field.
     */
  public void setRede_txtransferencia(String REDE_TXTRANSFERENCIA) {
    rede_txtransferencia = REDE_TXTRANSFERENCIA;
  }
  /**
    * REDE_SLOT: Gets the value of this field.
    */
  public String getRede_slot() {
    return rede_slot;
  }
  /**
     * REDE_SLOT: Sets thhe value for this field.
     */
  public void setRede_slot(String REDE_SLOT) {
    rede_slot = REDE_SLOT;
  }
  /**
    * Reset all fields.
    */
  public void reset(org.apache.struts.action.ActionMapping mapping,
      javax.servlet.http.HttpServletRequest request) {
    rede_id = null;
    rede_marca = null;
    rede_modelo = null;
    rede_txtransferencia = null;
    rede_slot = null;
  }
  /**
    * Validate fields and return ActionErrors.
    */

  public ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
      javax.servlet.http.HttpServletRequest request) {
    ActionErrors errors = new ActionErrors();
    valida = false;
    if (!com.egen.util.struts.Token.isTokenValid(mapping, request)) {
      errors.add("Warning", new ActionError("token.error","<br>","","",""));
    }
    com.egen.util.struts.Token.saveToken(mapping, request);
    if (com.egen.util.text.Validate.isValidate("update_action,delete_action,",
        request)) {

      if (com.egen.util.text.Validate.isNull(rede_marca)) {
        errors.add("ActionErrors.GLOBAL_ERROR",
            new ActionError("error.validate.notnull","Marca","rede_marca",
                "0"));
      }



    }
    if (errors != null && errors.size() > 0) {
      javax.servlet.http.HttpSession session = request.getSession(true);
      ActionForward actionForward = null;
      session.setAttribute(mapping.getName(), this);
    }
    return errors;
  }
}
